import  request  from '@/utils/request'

//组织
export function selectOrg() {
  return request({
    url: '/pd-auth/core_org/queryAll',
    method: 'get',
  })
}

//根据组织编号查询组织对应的定时任务信息
export function getScheduleJobBybusinessId(businessId){
  return request({
    url: `/pd-dispatch/scheduleJob/getScheduleJobBybusinessId/${ businessId }`,
    method: 'get',
    params: { businessId }
  })
}
//创建定时任务
export function createScheduleJob(scheduleJobBean){
  return request({
    url: '/pd-dispatch/scheduleJob/createScheduleJob',
    method: 'post',
    data: scheduleJobBean
  })
}
//修改定时任务信息
export function updateScheduleJob(scheduleJobBean){
  return request({
    url: '/pd-dispatch/scheduleJob/updateScheduleJob',
    method: 'post',
    data: scheduleJobBean
  })
}
//暂停定时任务
export function stopScheduleJob(scheduleJobBean) {
  return request({
    url: '/pd-dispatch/scheduleJob/stopScheduleJob',
    method: 'post',
    data: scheduleJobBean
  })
}
//立即执行任务
export function executeScheduleJob(scheduleJobBean){
  return request({
    url: '/pd-dispatch/scheduleJob/executeScheduleJob',
    method: 'post',
    data: scheduleJobBean
  })
}
//多条件分页查询定时任务日志信息
export function getScheduleJobLogById(scheduleJobLogDto){
  return request({
    url: '/pd-dispatch/scheduleJobLog/getScheduleJobLogById',
    method: 'post',
    data: scheduleJobLogDto
  })}

